FROM python:3.7.4

RUN apt-get update -yqq && apt-get install -yqq openssh-server && apt-get install -yqq openssh-client
WORKDIR /usr/src/app

RUN mkdir -p ~/.pip && touch ~/.pip/pip.conf && echo "[global]"> ~/.pip/pip.conf && echo "index-url = https://pypi.tuna.tsinghua.edu.cn/simple">> ~/.pip/pip.conf

RUN pip install DateTime>=4.2 &&  pip install Flask>=0.12.2 
RUN pip install itsdangerous>=0.24 Jinja2>=2.10 MarkupSafe>=1.0 numpy>=1.14.2 pandas>=0.22.0 patsy>=0.5.0 pip>=9.0.3 
RUN pip install PyMySQL>=0.8.0 python-dateutil>=2.7.0 pytz>=2018.3 cipy>=0.1.0 setuptools>=18.2 six>=1.11.0 SQLAlchemy>=1.2.12 statsmodels>=0.8.0 Werkzeug>=0.14.1 wheel>=0.30.0 zope.interface>=4.4.3

#RUN pip install tqdm matplotlib empyrical
RUN pip install hmmlearn sklearn
RUN pip install tushare simplejson bs4 Flask-MySQLdb Django && pip install tushare --upgrade
RUN sed -i "36a PubkeyAuthentication yes #启用公钥私钥配对认证方式 \nPermitRootLogin yes #允许root用户使用ssh登录" /etc/ssh/sshd_config
RUN echo "root:root" | chpasswd

RUN apt-get install -yqq vim
RUN apt-get install -yqq man && apt-get install -yqq lsof
RUN pip install uwsgi dss
RUN pip install ipython jupyter arch matplotlib 
RUN pip install jqdatasdk docxtpl

#RUN apt-get install -yqq wget glibc e2fsprogs krb5-libs openssl make.x86_64
#WORKDIR /usr/local/src
#RUN wget http://download.microsoft.com/download/6/A/B/6AB27E13-46AE-4CE9-AFFD-406367CADC1D/Linux6/sqlncli-11.0.1790.0.tar.gz
#RUN tar xzvf sqlncli-11.0.1790.0.tar.gz && cd sqlncli-11.0.1790.0 && sed -i 's/\/bin\/sh/\/bin\/bash/' install.sh && sed -i 's/\/bin\/sh/\/bin\/bash/' build_dm.sh
#RUN cd ../ && wget http://www.unixodbc.org/unixODBC-2.3.0.tar.gz && tar xzvf unixODBC-2.3.0.tar.gz && cd unixODBC-2.3.0 && CPPFLAGS="-DSIZEOF_LONG_INT=8" && export CPPFLAGS
#RUN ./configure --prefix=/usr --libdir=/usr/lib64 --sysconfdir=/etc --enable-gui=no --enable-drivers=no --enable-iconv --with-iconv-char-enc=UTF9 --with-iconv-ucode-enc=UTF16LE
#RUN make && make install
#RUN cd ../sqlncli-11.0.1790.0 && echo YES | ./install.sh install

#RUN pip install pyodbc django_pyodbc
#ADD ./startup.sh /root/
#RUN sed -i "s/$//" /root/startup.sh
RUN echo "alias ll='ls -al'" >> /root/.profile
EXPOSE 22
